// 商户接口
import request from '@/utils/request'


// 商户列表-汇总
export function getAgentSumList(params: any) {
  return request({
    url: '/v1/admin/system/agentSum',
    method: 'get',
    params: params
  })
}

// 商户列表
export function getAgent(params: any) {
  return request({
    url: '/v1/admin/system/agentList',
    method: 'get',
    params: params
  })
}

// 商户列表新增
export function addAgent(data: any) {
  return request({
    url: '/v1/admin/system/addAgent',
    method: 'post',
    data: data
  })
}

// 修改-商户
export function editAgent(data: any) {
  return request({
    url: '/v1/admin/system/changeAgent',
    method: 'put',
    data: data
  })
}

// 商户列表-开启关闭API
export function putChangeAgentStatus(data: any) {
  return request({
    url: '/v1/admin/system/ChangeAgentStatus',
    method: 'put',
    data: data
  })
}

// 商户列表-商户ID反向查总代
export function getGeneralAgent(params: any) {
  return request({
    url: '/v1/admin/system/getOperatorByAgentId',
    method: 'get',
    params: params
  })
}

// 商户列表删除
export function delAgent(data: any) {
  return request({
    url: '/v1/admin/system/destroyAgent',
    method: 'delete',
    data: data
  })
}

// 商户登录日志
export function getAgentLoginLogList(params: any) {
  return request({
    url: '/v1/admin/system/agentLoginLogList',
    method: 'get',
    params: params
  })
}
// 商户行为日志
export function getAgentActionLogList(params: any) {
  return request({
    url: '/v1/admin/system/agentActionLogList',
    method: 'get',
    params: params
  })
}

// 生成秘钥秘钥
export function getAgentKey(data: any) {
  return request({
    url: '/v1/admin/system/randKey',
    method: 'post',
    data: data
  })
}

// 总代管理列表
export function getOperator(params: any) {
  return request({
    url: '/v1/admin/system/operatorList',
    method: 'get',
    params: params
  })
}

// 总代管理-新增
export function addOperator(data: any) {
  return request({
    url: '/v1/admin/system/addOperator',
    method: 'post',
    data: data
  })
}

// 总代管理-修改
export function editOperator(data: any) {
  return request({
    url: '/v1/admin/system/changeOperator',
    method: 'put',
    data: data
  })
}

// 总代管理-删除
export function delOperator(data: any) {
  return request({
    url: '/v1/admin/system/destroyOperator',
    method: 'delete',
    data: data
  })
}

// 总代列表-开启关闭API
export function editGeneralStatus(data: any) {
  return request({
    url: '/v1/admin/system/changeOperatorStatus',
    method: 'put',
    data: data
  })
}

// 修改-商户预存分
export function editAgentPreScore(data: any) {
  return request({
    url: '/v1/admin/system/changeAgentGrade',
    method: 'put',
    data: data
  })
}

// 修改-总代预存分
export function editOperatorPreScore(data: any) {
  return request({
    url: '/v1/admin/system/changeOperatorGrade',
    method: 'put',
    data: data
  })
}

// 谷歌验证码
export function googleKey(params: any) {
  return request({
    url: '/v1/admin/system/getGoogleCodeUrl',
    method: 'get',
    params: params
  })
}

// 更换谷歌验证码
export function checkGoogleKey(params: any) {
  return request({
    url: '/v1/admin/system/checkGoogleCode',
    method: 'get',
    params: params
  })
}
// 总代批量查询商户
export function getAgentBatch(data: any) {
  return request({
    url: '/v1/admin/system/getCanChangeAgentArr',
    method: 'post',
    data: data
  })
}
// 批量开启关闭商户API-获取商户
export function getAgentApiList(params: any) {
  return request({
    url: '/v1/admin/system/getCanChangeAgent',
    method: 'get',
    params: params
  })
}
// 批量开启关闭商户API
export function editAgentApi(data: any) {
  return request({
    url: '/v1/admin/system/changeMoreAgentStatus',
    method: 'put',
    data: data
  })
}

// 获取收款钱包地址
export function getWalletAddress(params: any) {
  return request({
    url: '/v1/admin/system/getDeliveryAddress ',
    method: 'get',
    params: params
  })
}
// 设置收款钱包地址
export function addWalletAddress(data: any) {
  return request({
    url: '/v1/admin/system/setDeliveryAddress ',
    method: 'post',
    data: data
  })
}
// PDF导出 - 获取商户账单信息
export function getCheckReport(data: any) {
  return request({
    url: '/v1/game/getAgentReportAccountBill',
    method: 'post',
    data: data
  })
}

// 删除列表 - 查询已删除总代下商户
export function getDeleteChannel(params: any) {
  return request({
    url: '/v1/admin/system/getAllDelAgentAndOperatorList',
    method: 'get',
    params: params
  })
}
// 删除列表 - 恢复已删除总代下商户
export function recoverChannel(data: any) {
  return request({
    url: '/v1/admin/system/recoverAgent',
    method: 'put',
    data: data
  })
}